#pragma once

#include <cstdint>

namespace limbo::details {

uint32_t crc32(const uint8_t *data, uint32_t data_length,
               uint32_t initial = 0xFFFFFFFFu);

inline uint32_t crc32_finalize(uint32_t value) {
  // Finalize the CRC-32 value by inverting all the bits
  return value ^ 0xFFFFFFFFu;
}

} // namespace limbo::details
